#ifndef OHOS_BT_GAP_H
#define OHOS_BT_GAP_H

#include "bts_le_gap.h"
#include "bts_def.h"
#include "ohos_bt_log.h"
#include "ohos_bt_gatt.h"
#include "ohos_bt_gatt_server.h"


#define BLE_ADV_HANDLE_DEFAULT 1

extern uint8_t g_server_id;  /* gatt server ID */
extern BtGattServerCallbacks *g_bleGattsCb ;
extern BdAddr g_bdAddr;

extern gap_ble_callbacks_t g_gapCallback;

void ble_enable_callback(errcode_t status);
void ble_disable_callback(errcode_t status);
void set_adv_data_callback(uint8_t adv_id, errcode_t status);
void set_adv_param_callback(uint8_t adv_id, errcode_t status);
void start_adv_callback(uint8_t adv_id, adv_status_t status);
void stop_adv_callback(uint8_t adv_id, adv_status_t status);

void conn_state_change_callback(uint16_t conn_id, bd_addr_t *addr, gap_ble_conn_state_t conn_state, gap_ble_pair_state_t pair_state, gap_ble_disc_reason_t disc_reason);


#endif //OHOS_BT_GAP_H